package com.xh.sys.entity;

import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.ibatis.annotations.Update;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 *  实体类。
 *
 * @author LHL
 * @since 2023-10-18
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(value = "sys_comment_back", schema = "audit")
public class SysCommentBack implements Serializable {

    /**
     * 主键
     */
    @Id(keyType = KeyType.Auto)
    @NotNull(message = "id 不能空",groups = Update.class)
    private Integer id;

    /**
     * 类别,关联表,一个表一个类别,字典
     */
    @NotNull(message = "type不能空")
    private Integer type;

    /**
     * 主键列
     */
    @NotBlank(message = "pk不能空")
    private String key;

    /**
     * 主键值 id值
     */
    @NotBlank(message = "pkv不能空")
    private String value;

    /**
     * 浏览次数
     */
    private Integer viewedNumber;

    /**
     * 下载次数
     */
    private Integer downloadNumber;


}
